package com.calm.editor.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.google.gson.annotations.Expose;

@Table(name = "XHTML_PAGE_NAMESPACE")
@Entity
public class Namespace {
	@Id
	@Column(name = "ID")
	@GeneratedValue(strategy = GenerationType.TABLE,generator="XHTML_PAGE_NAMESPACE_ID")
	@TableGenerator(name = "XHTML_PAGE_NAMESPACE_ID", pkColumnValue = "XHTML_PAGE_NAMESPACE_ID", table = "ID_SEQUENCE", pkColumnName = "ID_KEY", valueColumnName = "VALUE", allocationSize = 1)
	private Integer id;

	@ManyToOne()
	@JoinColumn(name = "PAGE_ID")
	@Expose(serialize = false)
	private Page page;
	
	@Column(name = "NAMESPACE")
	private String namespace;
	
	@Column(name = "PREFIX")
	private String prefix;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}

	public String getNamespace() {
		return namespace;
	}

	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}

	public String getPrefix() {
		return prefix;
	}

	public void setPrefix(String prefix) {
		this.prefix = prefix;
	}
	
}
